package com.xmindguoguo.boot;

import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;

/**
 * 在guns开源项目看到这样一个类，于是查了下用途：若打包成war包,则需要继承 org.springframework.boot.context.web.SpringBootServletInitializer类,覆盖其config(SpringApplicationBuilder)方法
 * --------------------- 作者：自由乐 来源：CSDN 原文：https://blog.csdn.net/luckyzsion/article/details/81135438 版权声明：本文为博主原创文章，转载请附上博文链接！
 */
public class BootInitializer extends SpringBootServletInitializer {

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(BootApplication.class);
    }

}
